import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '@/components/Login'
import Codetest from '@/components/Codetest'
import main from '@/components/main'
import NotFound from '@/components/NotFound'
import ExamList from '@/components/ExamList'
import WelCome from '@/components/WelCome'
import ExamListReport from '@/components/report/ExamListReport'
import SubjectList from '@/components/SubjectList'
import BatchAddExamList from '@/components/BatchAddExamList'
import changepassword   from '@/components/changepassword'
import EditNotice from '@/components/EditNotice'
import DateManger from '@/components/DateManger'
import AutoExamList from '@/components/AutoExamList'
import StudentList from '@/components/StudentList'
import logs from '@/components/logs'
Vue.use(Router)
const router =  new Router({
    routes: [
      {
        path: '/',
        redirect:'/login'
        
      },
      {
        path:"/login",
        component:Login
      },
      {
        path:"/codetest",
        component:Codetest

      },
      {
        path: '/main/:name',
        name: 'main',
        props :true,
        component: main,
        redirect :"/welcome",
        children:[
          {
            path: '/HelloWorld',
            name: 'HelloWorld',
            component: HelloWorld,
          },
          {
            path: '/examlist',
            name: 'examlist',
            component:ExamList,
          },
          {
            path: '/welcome',
            name: 'welcome',
            component:WelCome,
          },
          {
            path:'/ExamlistReport',
            name:'ExamlistReport',
            component:ExamListReport,
          },
          {
            path:'/SubjectList',
            name:'SubjectList',
            component:SubjectList,
          },
          {
            path:"/BatchAddExamList",
            name:"BatchAddExamList",
            component:BatchAddExamList
          },
          {
            path:"/changepassword",
            name:"changepassword",
            component:changepassword

          },
          {
            path:"/EditNotice",
            name:"EditNotice",
            component:EditNotice,
          },
          {
            path:"/DateManger",
            name:"DateManger",
            component:DateManger
          },
          {
            path:"/AutoExamList",
            name:"AutoExamList",
            component:AutoExamList
          },{
            path:"/StudentList",
            name:"StudentList",
            component:StudentList
          },{
            path:"/logs",
            name:"logs",
            component:logs

          }

        
        
        ]

      },
      {
        path:"*",
        component:NotFound,
      }
      



     
    
  
    ]
  })
  export default router